1. Field of the Invention
The present invention relates to a communication apparatus that selects a network for connection from among a plurality of networks, a method for controlling such a communication apparatus, and a storage medium.
2. Description of the Related Art
The present invention relates to a three-dimensional measurement apparatus, a method for controlling a three-dimensional measurement apparatus and a program, and more particularly to a three-dimensional measurement apparatus using a spatial coding technique that generates spatial modulation by projecting pattern light in which a bright part and a dark part are arranged at a given interval, a method for controlling such a three-dimensional measurement apparatus and a program.
As three-dimensional measurement, a measurement method is well known in which a projection apparatus and a capturing apparatus are disposed in a known relationship, an object onto which pattern light is projected from the projection apparatus is captured, and the distance to the object is determined from the relationship between the projection apparatus and the capturing apparatus using triangulation.
Japanese Patent Laid-Open No. 2007-192608 discloses a method for performing three-dimensional measurement by projecting first pattern light in which a bright part and a dark part are alternately arranged at a given interval and second pattern light in which the phase of the first pattern light is shifted so as to obtain tone distributions of respective captured images and calculating the position on the image sensor of an intersection point between the first pattern light and the second pattern light.
Distance measurement is based on the calculation of positions at which intersections calculated from the first pattern light and the second pattern light are located, but what is more important than the absolute values of the intersection points between the first pattern light and the second pattern light is accurate determination of intersection intervals therebetween.
The reason is as follows. The absolute values of the intersection points are necessary to calculate the absolute position of an object, but the main purpose of three-dimensional measurement is to measure the shape of an object, so that in this case, it is sufficient if relative positions of intersection points can be accurately determined. Calculation of the absolute position of an object can be achieved by preparing known absolute position indices and performing calibration for measuring the relative relationship of the object with the indices.
With conventional intersection point detection techniques, intersection points are determined by sampling tone distributions on the image sensor of first pattern light and second pattern light with capture pixels and performing straight-line approximation on sampling points of the respective pattern lights. In the case of sampling one period of the pattern light projected onto the measurement target object with a relatively small number of image sensor pixels, if a conventional method is used to determine intersection points, sampling errors due to straight-line approximation are included in the intersection points. Accordingly, if intersection intervals are calculated using the intersection points, errors will occur in the intersection intervals. The occurrence of such errors becomes apparent particularly when one period of the pattern light is sampled with an approximately odd number of image sensor pixels. The intersection point errors as well as the intersection interval errors can be reduced if one period of the pattern light is sampled with a higher number of image sensor pixels, but it requires a high-resolution image sensor so problems arise in that the size and cost of the apparatus increase. Meanwhile, there are cases where the luminance value of either the first pattern light or the second pattern light becomes high overall due to the influence of ambient light or the like. In this case, even if a high-resolution image sensor is used, shifts occur in the intersection points between the first pattern light and the second pattern light, causing errors in intersection point calculation.